import React from "react";
import { Route, Routes, useRoutes } from "react-router-dom";
import routes from "./routerConfig";
export default function RouteApp() {
  const element = useRoutes(routes);
  return (
    <div>
      {element}
      {/* <Routes>
          {routes.map((p) => (
            <Route key={p.name} {...p} />
          ))} 
           <Route path="/" exact element={<Home />} />
          <Route path="/movies" element={<Movies />} />
          <Route path="/user" element={<User />} />
          <Route element={<NotFound />} />  
        </Routes>*/}
    </div>
  );
}
